<script setup lang="ts">
import { onMounted } from 'vue';
const move = (e: MouseEvent) => {
    console.log('e.pageX -----> ', e.pageX);
    console.log('e.pageY -----> ', e.pageY);
}

// 获取dom类型： document.querySelector('div')
// 获取事件的类型： document.addEventListener('mousemove')
onMounted(
    () => {
        document.addEventListener('mousemove', move)
    }
)

const keydown = (e: KeyboardEvent) => {
    console.log('e -----> ', e);
}
</script>

<template>
    <h1>Hello vue3 + ts👍</h1>
    <input @keydown="keydown" />
</template>

<style lang="less" scoped>

</style>
